package ch6.ex20;

import static ch6.print.Print.*;
import ch6.withfinals.*;


class OverridingPrivate extends WithFinals{
	private final void f(){
		println("OverridingPrivate.f()");
	}
	private void g(){
		println("OverridingPrivate.g()");
	}
}

/*class OverridingPrivate3 extends WithFinals{
	@Override private final void f(){
		println("OverridingPrivate3.f()");
	}
	@Override private void g(){
		println("OverridingPrivate3.g()");
	}
}*/

class OverridingPrivate4 extends OverridingPrivate{
	public final void f(){
		println("OverridingPrivate4.f()");
	}
	public void g(){
		println("OverridingPrivate4.g()");
	}
}

class OverridingPrivate2 extends OverridingPrivate{
	public final void f(){
		println("OverridingPrivate2.f()");
	}
	public final void g(){
		println("OverridingPrivate2.g()");
	}
}

public class OverrideAnnotation {
	public static void main(String... args){
		OverridingPrivate2 o2 = new OverridingPrivate2();
		o2.f();
		o2.g();
		OverridingPrivate o = o2;
		//o.f();
		//o.g();
	}
}
